package com.example.springboot.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.springboot.entity.RelationPoet;
import com.example.springboot.mapper.RelationPoetMapper;
import com.example.springboot.service.RelationPoetService;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

@Service
public class RelationPoetServiceImpl extends ServiceImpl<RelationPoetMapper, RelationPoet> implements RelationPoetService {


    @Override
    public List<RelationPoet> listRelationPoet(Integer relationTypeId) {
        LambdaQueryWrapper<RelationPoet> wrapper = Wrappers.lambdaQuery(RelationPoet.class)
                .eq(RelationPoet::getRelationTypeId, relationTypeId);
        List<RelationPoet> list = this.list(wrapper);
        return list;
    }
}
